/*
 *      Created on: Mar 4, 2011
 *      Author: topcoder
 */

#ifndef UNIT_H_
#define UNIT_H_

#include <string>
using namespace std;

class Unit
{
    public:  
    friend ostream& operator<<(ostream& os, const Unit& unit);

    unsigned int getFactor()const;

    unsigned int convertToBaseUnitAmount(const unsigned int amount)const;

    protected:   
    Unit(const unsigned int factor, const string name); 
 
    unsigned int factor_m;

    string name_m;
};

#endif /* UNIT_H_ */

